/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.money.biz.impl;

import com.money.biz.ArticleBiz;
import com.money.dao.ArticleDao;
import com.money.entity.Article;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.dao.DataAccessException;

/**
 *
 * @author Eason
 */
public class ArticleBizImpl <T extends Article> implements ArticleBiz<T>{
    
    @Resource(name="ariticleDao")
    private ArticleDao<T> dao;
    
    public boolean addArticle(T entity) throws DataAccessException{
        if(entity == null){
            
        }
        return dao.addArticle(entity);
    }
    
    public boolean editArticle(T entity) throws DataAccessException{
        if(entity == null){
            
        }
        return dao.editArticle(entity);
    }
    
    public boolean removeArticle(int id) throws DataAccessException{
       
       return dao.removeArticle(id);
    }
    
    public List getAllArticle() throws DataAccessException{
        return dao.getAllArticle();
    }
}
